package com.sg.service.biz.bff.impl;

import cn.hutool.core.bean.BeanUtil;
import com.sg.common.exception.Assert;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.dto.integration.app.ImplementIniOrgAndDeptWorkTaskMsgLocComReqDto;
import com.sg.dto.integration.app.ImplementIniOrgAndDeptWorkTaskMsgLocComRespDto;
import com.sg.dto.integration.component.ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto;
import com.sg.dto.integration.component.ImplementIniOrgWorkTaskMsgLocationByLoginComRespDto;
import com.sg.dto.integration.component.ObtainProgressLoadingBgComReqDto;
import com.sg.dto.integration.component.ObtainProgressLoadingBgComRespDto;
import com.sg.service.biz.bff.OrgService;
import com.sg.service.biz.bff.nb.NbOrg;
import com.wicket.okrbff.common.dto.TreeNode;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class OrgServiceImpl implements OrgService {

    @Resource
    com.sg.service.biz.framework.DivineDataService divineDataClient;
    @Resource
    NbOrg nbOrg;
    @Resource
    com.sg.service.biz.framework.OrgService fwBaseOrgClient;
    @Resource
    com.sg.service.biz.framework.DivineDataService fwBaseDivineDataClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    private RedisUtil redisUtil;
    @Resource
    com.sg.service.biz.component.ConfSchemeService fwCompConfSchemeClient;
    @Resource
    com.sg.service.biz.app.MessageService fwAppMessageClient;
    @Resource
    com.sg.service.biz.component.MessageService fwCompMessageClient;

    /**
     * B1-3新增部门（管理）[661]
     * gen by moon at 1/24/2024, 4:09:34 AM
     */
    @Trace(operationName = "B1-3新增部门（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddDeptRespDto addDept(BffAddDeptReqDto reqDto) {


        AddDeptRespDto addDeptRespDto_1 = null;
//virtualUsage D1-3新增部门  60087
        AddDeptRespDto addDeptRespDto = null;
        AddDeptReqDto addDeptReqDto = new AddDeptReqDto();
        if (reqDto != null) {
            addDeptReqDto.setSuperiorContentCode(reqDto.getSuperiorContentCode());//SimpleFieldAssign//sourceId:104497_1_60087
            addDeptReqDto.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:23301_1_60087
            addDeptReqDto.setDeptEnName(reqDto.getDeptEnName());//SimpleFieldAssign//sourceId:23302_1_60087
            addDeptReqDto.setDeptShortName(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:23303_1_60087
            addDeptReqDto.setDeptNumber(reqDto.getDeptNumber());//SimpleFieldAssign//sourceId:23300_1_60087
            addDeptReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:23290_1_60087
            addDeptReqDto.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:23296_1_60087
            addDeptReqDto.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:23291_1_60087
            addDeptReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:23292_1_60087
            addDeptReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:23293_1_60087
            addDeptReqDto.setIsDirectlyMember(reqDto.getIsDirectlyMember());//SimpleFieldAssign//sourceId:23297_1_60087
            addDeptReqDto.setIsCreateLowerDept(reqDto.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:23298_1_60087
            addDeptReqDto.setDeptDutyDesc(reqDto.getDeptDutyDesc());//SimpleFieldAssign//sourceId:23334_1_60087
            addDeptReqDto.setDeptTargetDesc(reqDto.getDeptTargetDesc());//SimpleFieldAssign//sourceId:23335_1_60087
            addDeptReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:49688_1_60087
        }

        /*D1-3新增部门[659]   */
        Assert.isNull(addDeptReqDto.getSuperiorContentCode(), "B1-3新增部门（管理）-D1-3新增部门-上级内容标识不能为空", false);
        Assert.isNull(addDeptReqDto.getDeptName(), "B1-3新增部门（管理）-D1-3新增部门-部门名称（中文）不能为空", false);
        Assert.isNull(addDeptReqDto.getDeptShortName(), "B1-3新增部门（管理）-D1-3新增部门-部门简称不能为空", false);
        Assert.isNull(addDeptReqDto.getDeptNumber(), "B1-3新增部门（管理）-D1-3新增部门-部门编号不能为空", false);
        Assert.isNull(addDeptReqDto.getTypeDictionaryId(), "B1-3新增部门（管理）-D1-3新增部门-部门类型字典ID不能为空", false);
        Assert.isNull(addDeptReqDto.getOrganizationId(), "B1-3新增部门（管理）-D1-3新增部门-组织ID不能为空", false);
        Assert.isNull(addDeptReqDto.getOrderNumber(), "B1-3新增部门（管理）-D1-3新增部门-排序不能为空", false);
        Assert.isNull(addDeptReqDto.getIsDirectlyMember(), "B1-3新增部门（管理）-D1-3新增部门-是否有直属成员不能为空", false);
        Assert.isNull(addDeptReqDto.getIsCreateLowerDept(), "B1-3新增部门（管理）-D1-3新增部门-是否可创建下级部门不能为空", false);
        Assert.isNull(addDeptReqDto.getSubjectLifeCycle(), "B1-3新增部门（管理）-D1-3新增部门-主体生命周期不能为空", false);
        addDeptRespDto = fwBaseOrgClient.addDept(addDeptReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addDeptRespDto_1 = addDeptRespDto;
        if ((reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
            //if(B1-3新增部门（管理）.主体生命周期 等于 当前有效)  60088

            ImplementIniOrgWorkTaskMsgLocationByLoginComRespDto implementIniOrgWorkTaskMsgLocationByLoginComRespDto = null;
            if (addDeptRespDto != null) {
                ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto implementIniOrgWorkTaskMsgLocationByLoginComReqDto = new ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto();
                implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setSurfaceCode("ORG_OR_DEPT");//sourceId:1499895_1_60089
                implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1499894_1_60089
                if (addDeptRespDto != null) {
                    implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setEntityId(addDeptRespDto.getDeptId());//SimpleFieldAssign//sourceId:1499896_1_60089
                }

                /*D2-执行初始化组织工作任务消息数量(公共)[7877]   */
                Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getSurfaceCode(), "B1-3新增部门（管理）-D2-执行初始化组织工作任务消息数量(公共)-归属内容类型编码不能为空", false);
                Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getEntityId(), "B1-3新增部门（管理）-D2-执行初始化组织工作任务消息数量(公共)-归属内容ID不能为空", false);
                Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getSpaceId(), "B1-3新增部门（管理）-D2-执行初始化组织工作任务消息数量(公共)-创建于空间ID不能为空", false);
                implementIniOrgWorkTaskMsgLocationByLoginComRespDto = fwCompMessageClient.implementIniOrgWorkTaskMsgLocationByLoginCom(implementIniOrgWorkTaskMsgLocationByLoginComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
        }
        BffAddDeptRespDto retData = new BffAddDeptRespDto();
        if (addDeptRespDto_1 != null) {
            retData.setDeptId(addDeptRespDto_1.getDeptId());//SimpleFieldAssign//sourceId:30266_1
        }


        return retData;
    }

    /**
     * B1-3查询部门树状结构列表[290]
     * gen by moon at 10/16/2022, 6:04:00 AM
     */
    @Trace(operationName = "B1-3查询部门树状结构列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptTreeListRespDto queryDeptTreeList(BffQueryDeptTreeListReqDto reqDto) {


        QueryDeptTreeListRespDto queryDeptTreeListRespDto_1 = null;
//步骤0: D1-3查询部门树状结构列表	 - queryDeptTreeList
        QueryDeptTreeListRespDto queryDeptTreeListRespDto = null;
        QueryDeptTreeListReqDto queryDeptTreeListReqDto = new QueryDeptTreeListReqDto();
        if (reqDto != null) {
            queryDeptTreeListReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:237721_1
            queryDeptTreeListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:41214_1
        }

        /*D1-3查询部门树状结构列表	[1177]   */
        Assert.isNull(queryDeptTreeListReqDto.getOrganizationId(), "B1-3查询部门树状结构列表-D1-3查询部门树状结构列表	-组织ID不能为空", false);
        Assert.isNull(queryDeptTreeListReqDto.getTypeDictionaryId(), "B1-3查询部门树状结构列表-D1-3查询部门树状结构列表	-部门类型字典ID不能为空", false);
        queryDeptTreeListRespDto = fwBaseOrgClient.queryDeptTreeList(queryDeptTreeListReqDto).getData();


        queryDeptTreeListRespDto_1 = queryDeptTreeListRespDto;

        BffQueryDeptTreeListRespDto retData = new BffQueryDeptTreeListRespDto();
        if (queryDeptTreeListRespDto_1 != null) {
            retData.setDeptList(queryDeptTreeListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:380721_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3查询部门树状结构列表（边界）
     */
    @Override
    public BffQueryDeptBorderTreeListRespDto queryDeptBorderTreeList(BffQueryDeptBorderTreeListReqDto reqDto) {


        //步骤0: D1-3查询部门树状结构列表	 - queryDeptTreeList
        QueryDeptTreeListRespDto queryDeptTreeListRespDto = null;
        QueryDeptTreeListReqDto queryDeptTreeListReqDto = new QueryDeptTreeListReqDto();
        if (reqDto != null) {
            queryDeptTreeListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());
        }

        /*D1-3查询部门树状结构列表	[1177]   */
        queryDeptTreeListRespDto = fwBaseOrgClient.queryDeptTreeList(queryDeptTreeListReqDto).getData();


        BffQueryDeptBorderTreeListRespDto retData = new BffQueryDeptBorderTreeListRespDto();
        retData.setDeptList(queryDeptTreeListRespDto.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3查询当前我的部门列表（边界）[1789]
     * gen by moon at 8/10/2022, 3:37:42 AM
     */
    @Trace(operationName = "B1-3查询当前我的部门列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryMyCurrentDeptListBorderRespDto queryMyCurrentDeptListBorder(BffQueryMyCurrentDeptListBorderReqDto reqDto) {


        AddGetUserIrInfoFromRedisRespDto getUserIrInfoFromRedisRes_1 = null;
//步骤0: D-Redis获取用户就职信息 - addGetUserIrInfoFromRedis
        //ModelCode: getUserIrInfoFromRedis
        AddGetUserIrInfoFromRedisRespDto getUserIrInfoFromRedisRes = null;
        AddGetUserIrInfoFromRedisReqDto getUserIrInfoFromRedisReq = new AddGetUserIrInfoFromRedisReqDto();
        getUserIrInfoFromRedisReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:54443_1

        /*D-Redis获取用户就职信息[1681]   */
        Assert.isNull(getUserIrInfoFromRedisReq.getOriginalRoleMemberId(), "B1-3查询当前我的部门列表（边界）-D-Redis获取用户就职信息-身份人员ID不能为空", false);
        getUserIrInfoFromRedisRes = nbOrg.addGetUserIrInfoFromRedis(getUserIrInfoFromRedisReq);

        getUserIrInfoFromRedisRes_1 = getUserIrInfoFromRedisRes;

        BffQueryMyCurrentDeptListBorderRespDto retData = new BffQueryMyCurrentDeptListBorderRespDto();
        if (getUserIrInfoFromRedisRes_1 != null) {
            retData.setOrgInductionRecordList(getUserIrInfoFromRedisRes_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:54447_1
        }


        return retData;
    }

    /**
     * B1-3取消冻结组织（管理）[1121]
     * gen by moon at 8/10/2022, 3:33:02 AM
     */
    @Trace(operationName = "B1-3取消冻结组织（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUndoFreezeOrgRespDto undoFreezeOrg(BffUndoFreezeOrgReqDto reqDto) {


        //步骤0: D1-3修改组织 - updateOrg
        UpdateOrgRespDto updateOrgRespDto = null;
        UpdateOrgReqDto updateOrgReqDto = new UpdateOrgReqDto();
        updateOrgReqDto.setManageLockStatus("FALSE");//sourceId:43774_1
        updateOrgReqDto.setUsingLockStatus("FALSE");//sourceId:43777_1
//if(updateOrgReqDto!=null && updateOrgReqDto.getIsInvalid() !=null &&updateOrgReqDto.getIsInvalid().equals("FALSE")){
//              updateOrgReqDto.setReasonOfUsingLock(null);
//          }//sourceId:43776_1
        if (reqDto != null) {
            updateOrgReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:43773_1
        }

        /*D1-3修改组织[797]   */
        Assert.isNull(updateOrgReqDto.getOrganizationId(), "B1-3取消冻结组织（管理）-D1-3修改组织-组织ID不能为空", false);
        updateOrgRespDto = fwBaseOrgClient.updateOrg(updateOrgReqDto).getData();


        BffUndoFreezeOrgRespDto retData = new BffUndoFreezeOrgRespDto();


        return retData;
    }

    /**
     * B1-3冻结组织（管理）[1120]
     * gen by moon at 8/10/2022, 3:32:59 AM
     */
    @Trace(operationName = "B1-3冻结组织（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffFreezeOrgRespDto freezeOrg(BffFreezeOrgReqDto reqDto) {


        //步骤0: D1-3修改组织 - updateOrg
        UpdateOrgRespDto updateOrgRespDto = null;
        UpdateOrgReqDto updateOrgReqDto = new UpdateOrgReqDto();
        updateOrgReqDto.setManageLockStatus("TRUE");//sourceId:43753_1
        updateOrgReqDto.setUsingLockStatus("TRUE");//sourceId:43756_1
//updateOrgReqDto.setReasonOfManageLock();//MANUAL_FROZEN  TODO ruizhe dong//sourceId:43754_1
        if (reqDto != null) {
            updateOrgReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:43752_1
            updateOrgReqDto.setReasonOfUsingLock(reqDto.getReasonOfUsingLock());//sourceId:43755_1
        }

        /*D1-3修改组织[797]   */
        Assert.isNull(updateOrgReqDto.getOrganizationId(), "B1-3冻结组织（管理）-D1-3修改组织-组织ID不能为空", false);
        updateOrgRespDto = fwBaseOrgClient.updateOrg(updateOrgReqDto).getData();


        BffFreezeOrgRespDto retData = new BffFreezeOrgRespDto();


        return retData;
    }

    /**
     * B1-3删除部门（管理）[668]
     * gen by moon at 9/2/2022, 6:37:23 PM
     */
    @Trace(operationName = "B1-3删除部门（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteDeptRespDto deleteDept(BffDeleteDeptReqDto reqDto) {


        //步骤0: D1-3删除部门 - deleteDept
        DeleteDeptRespDto deleteDeptRespDto = null;
        DeleteDeptReqDto deleteDeptReqDto = new DeleteDeptReqDto();
        if (reqDto != null) {
            deleteDeptReqDto.setDeptId(reqDto.getDeptId());//sourceId:41474_1
        }

        /*D1-3删除部门[666]   */
        Assert.isNull(deleteDeptReqDto.getDeptId(), "B1-3删除部门（管理）-D1-3删除部门-部门ID不能为空", false);
        deleteDeptRespDto = fwBaseOrgClient.deleteDept(deleteDeptReqDto).getData();


        BffDeleteDeptRespDto retData = new BffDeleteDeptRespDto();


        return retData;
    }

    /**
     * B1-2查中基层部门(边界)[2608]
     * gen by moon at 4/1/2024, 2:13:57 AM
     */
    @Trace(operationName = "B1-2查中基层部门(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryMidBaseCourseDetailBorderRespDto queryMidBaseCourseDetailBorder(BffQueryMidBaseCourseDetailBorderReqDto reqDto) {


        QueryMidBaseCourseDetailComRespDto queryMidBaseCourseDetailComRespDto_1 = null;
//步骤0: D1-2查询中基层部门详情(公共) - queryMidBaseCourseDetailCom
        QueryMidBaseCourseDetailComRespDto queryMidBaseCourseDetailComRespDto = null;
        QueryMidBaseCourseDetailComReqDto queryMidBaseCourseDetailComReqDto = new QueryMidBaseCourseDetailComReqDto();
        if (reqDto != null) {
            queryMidBaseCourseDetailComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:255259_1
            queryMidBaseCourseDetailComReqDto.setInductionUnitTypeCode(reqDto.getInductionUnitTypeCode());//SimpleFieldAssign//sourceId:258648_1
        }

        /*D1-2查询中基层部门详情(公共)[2604]   */
        Assert.isNull(queryMidBaseCourseDetailComReqDto.getInductionUnitTypeCode(), "B1-2查中基层部门(边界)-D1-2查询中基层部门详情(公共)-就职单位类型实例不能为空", false);
        queryMidBaseCourseDetailComRespDto = fwBaseOrgClient.queryMidBaseCourseDetailCom(queryMidBaseCourseDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryMidBaseCourseDetailComRespDto_1 = queryMidBaseCourseDetailComRespDto;

//步骤1: D3-初始化组织部门工作任务消息数量(公共) - implementIniOrgAndDeptWorkTaskMsgLocCom
        ImplementIniOrgAndDeptWorkTaskMsgLocComRespDto implementIniOrgAndDeptWorkTaskMsgLocComRespDto = null;
        if (queryMidBaseCourseDetailComRespDto != null) {
            ImplementIniOrgAndDeptWorkTaskMsgLocComReqDto implementIniOrgAndDeptWorkTaskMsgLocComReqDto = new ImplementIniOrgAndDeptWorkTaskMsgLocComReqDto();
            implementIniOrgAndDeptWorkTaskMsgLocComReqDto.setInductionRecordId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:1493034_1
            implementIniOrgAndDeptWorkTaskMsgLocComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1493035_1
            implementIniOrgAndDeptWorkTaskMsgLocComReqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:1493036_1
            implementIniOrgAndDeptWorkTaskMsgLocComReqDto.setHighestOrgID(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:1493037_1
            if (queryMidBaseCourseDetailComRespDto != null) {
                implementIniOrgAndDeptWorkTaskMsgLocComReqDto.setPrimaryDeptId(queryMidBaseCourseDetailComRespDto.getPrimaryDeptId());//SimpleFieldAssign//sourceId:1493011_1
                implementIniOrgAndDeptWorkTaskMsgLocComReqDto.setGrassrootsDeptId(queryMidBaseCourseDetailComRespDto.getGrassrootsDeptId());//SimpleFieldAssign//sourceId:1493012_1
            }

            /*D3-初始化组织部门工作任务消息数量(公共)[8315]   */
            Assert.isNull(implementIniOrgAndDeptWorkTaskMsgLocComReqDto.getInductionRecordId(), "B1-2查中基层部门(边界)-D3-初始化组织部门工作任务消息数量(公共)-就职记录ID不能为空", false);
            Assert.isNull(implementIniOrgAndDeptWorkTaskMsgLocComReqDto.getSpaceId(), "B1-2查中基层部门(边界)-D3-初始化组织部门工作任务消息数量(公共)-创建于空间ID不能为空", false);
            Assert.isNull(implementIniOrgAndDeptWorkTaskMsgLocComReqDto.getAppId(), "B1-2查中基层部门(边界)-D3-初始化组织部门工作任务消息数量(公共)-创建于联盟应用ID不能为空", false);
            Assert.isNull(implementIniOrgAndDeptWorkTaskMsgLocComReqDto.getHighestOrgID(), "B1-2查中基层部门(边界)-D3-初始化组织部门工作任务消息数量(公共)-最高组织ID不能为空", false);
            implementIniOrgAndDeptWorkTaskMsgLocComRespDto = fwAppMessageClient.implementIniOrgAndDeptWorkTaskMsgLocCom(implementIniOrgAndDeptWorkTaskMsgLocComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }

        BffQueryMidBaseCourseDetailBorderRespDto retData = new BffQueryMidBaseCourseDetailBorderRespDto();
        if (queryMidBaseCourseDetailComRespDto_1 != null) {
            retData.setPrimaryDeptId(queryMidBaseCourseDetailComRespDto_1.getPrimaryDeptId());//SimpleFieldAssign//sourceId:1428422_1
            retData.setPrimaryDeptCode(queryMidBaseCourseDetailComRespDto_1.getPrimaryDeptCode());//SimpleFieldAssign//sourceId:1428423_1
            retData.setPrimaryDeptName(queryMidBaseCourseDetailComRespDto_1.getPrimaryDeptName());//SimpleFieldAssign//sourceId:1428424_1
            retData.setGrassrootsDeptId(queryMidBaseCourseDetailComRespDto_1.getGrassrootsDeptId());//SimpleFieldAssign//sourceId:1428425_1
            retData.setGrassrootsDeptCode(queryMidBaseCourseDetailComRespDto_1.getGrassrootsDeptCode());//SimpleFieldAssign//sourceId:1428426_1
            retData.setGrassrootsDeptName(queryMidBaseCourseDetailComRespDto_1.getGrassrootsDeptName());//SimpleFieldAssign//sourceId:1428427_1
        }


        return retData;
    }

    /**
     * B1-3查询部门树状结构列表（边界）[1358]
     * gen by moon at 10/16/2022, 6:04:02 AM
     */
    @Trace(operationName = "B1-3查询部门树状结构列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptTreeListBorderRespDto queryDeptTreeListBorder(BffQueryDeptTreeListBorderReqDto reqDto) {


        QueryDeptTreeListRespDto queryDeptTreeListRespDto_1 = null;
//步骤0: D1-3查询部门树状结构列表	 - queryDeptTreeList
        QueryDeptTreeListRespDto queryDeptTreeListRespDto = null;
        QueryDeptTreeListReqDto queryDeptTreeListReqDto = new QueryDeptTreeListReqDto();
        if (reqDto != null) {
            queryDeptTreeListReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:380709_1
            queryDeptTreeListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:49785_1
        }

        /*D1-3查询部门树状结构列表	[1177]   */
        Assert.isNull(queryDeptTreeListReqDto.getOrganizationId(), "B1-3查询部门树状结构列表（边界）-D1-3查询部门树状结构列表	-组织ID不能为空", false);
        Assert.isNull(queryDeptTreeListReqDto.getTypeDictionaryId(), "B1-3查询部门树状结构列表（边界）-D1-3查询部门树状结构列表	-部门类型字典ID不能为空", false);
        queryDeptTreeListRespDto = fwBaseOrgClient.queryDeptTreeList(queryDeptTreeListReqDto).getData();


        queryDeptTreeListRespDto_1 = queryDeptTreeListRespDto;

        BffQueryDeptTreeListBorderRespDto retData = new BffQueryDeptTreeListBorderRespDto();
        if (queryDeptTreeListRespDto_1 != null) {
            retData.setDeptList(queryDeptTreeListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:380718_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3查询树状结构下级部门列表（边界）[1844]
     * gen by moon at 8/10/2022, 3:38:14 AM
     */
    @Trace(operationName = "B1-3查询树状结构下级部门列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQuerySubordinateDeptTreeListBorderRespDto querySubordinateDeptTreeListBorder(BffQuerySubordinateDeptTreeListBorderReqDto reqDto) {


        QuerySubordinateDeptTreeListRespDto querySubordinateDeptTreeListRespDto_1 = null;
//步骤0: D1-3查询树状结构下级部门列表（边界） - querySubordinateDeptTreeList
        QuerySubordinateDeptTreeListRespDto querySubordinateDeptTreeListRespDto = null;
        QuerySubordinateDeptTreeListReqDto querySubordinateDeptTreeListReqDto = new QuerySubordinateDeptTreeListReqDto();
        querySubordinateDeptTreeListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56627_1
        querySubordinateDeptTreeListReqDto.setIsArchive("FALSE");//sourceId:56626_1
        if (reqDto != null) {
            querySubordinateDeptTreeListReqDto.setDeptCode(reqDto.getDeptCode());//sourceId:56625_1
        }

        /*D1-3查询树状结构下级部门列表（边界）[1845]   */
        Assert.isNull(querySubordinateDeptTreeListReqDto.getDeptCode(), "B1-3查询树状结构下级部门列表（边界）-D1-3查询树状结构下级部门列表（边界）-部门标识不能为空", false);
        Assert.isNull(querySubordinateDeptTreeListReqDto.getSubjectLifeCycle(), "B1-3查询树状结构下级部门列表（边界）-D1-3查询树状结构下级部门列表（边界）-主体生命周期不能为空", false);
        Assert.isNull(querySubordinateDeptTreeListReqDto.getIsArchive(), "B1-3查询树状结构下级部门列表（边界）-D1-3查询树状结构下级部门列表（边界）-是否存档不能为空", false);
        querySubordinateDeptTreeListRespDto = fwBaseOrgClient.querySubordinateDeptTreeList(querySubordinateDeptTreeListReqDto).getData();

        querySubordinateDeptTreeListRespDto_1 = querySubordinateDeptTreeListRespDto;

        BffQuerySubordinateDeptTreeListBorderRespDto retData = new BffQuerySubordinateDeptTreeListBorderRespDto();
        if (querySubordinateDeptTreeListRespDto_1 != null) {
            retData.setDeptList(querySubordinateDeptTreeListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//sourceId:63999_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3查询组织列表（边界）[1583]
     * gen by moon at 8/20/2022, 5:53:34 PM
     */
    @Trace(operationName = "B1-3查询组织列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryOrgListBorderRespDto queryOrgListBorder(BffQueryOrgListBorderReqDto reqDto) {


        QueryOrgListRespDto queryOrgListRespDto_1 = null;
//步骤0: D1-3查询组织列表 - queryOrgList
        QueryOrgListRespDto queryOrgListRespDto = null;
        QueryOrgListReqDto queryOrgListReqDto = new QueryOrgListReqDto();
        queryOrgListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:45896_1
        queryOrgListReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:45898_1

        /*D1-3查询组织列表[1584]   */
        Assert.isNull(queryOrgListReqDto.getSubjectLifeCycle(), "B1-3查询组织列表（边界）-D1-3查询组织列表-主体生命周期不能为空", false);
        Assert.isNull(queryOrgListReqDto.getSpaceId(), "B1-3查询组织列表（边界）-D1-3查询组织列表-创建于空间ID不能为空", false);
        queryOrgListRespDto = fwBaseOrgClient.queryOrgList(queryOrgListReqDto).getData();

        queryOrgListRespDto_1 = queryOrgListRespDto;

        BffQueryOrgListBorderRespDto retData = new BffQueryOrgListBorderRespDto();
        if (queryOrgListRespDto_1 != null) {
            retData.setOrgList(queryOrgListRespDto_1.getOrgList().stream().map(item -> BeanUtil.toBean(item, BffOrgDto.class)).collect(Collectors.toList()));//sourceId:45874_1
        }


        return retData;
    }


    /**
     * B1-3查询存档部门条件（管理）[1348]
     * gen by moon at 8/10/2022, 3:34:50 AM
     */
    @Trace(operationName = "B1-3查询存档部门条件（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryArchiveDeptRespDto queryArchiveDept(BffQueryArchiveDeptReqDto reqDto) {


        QueryDeptListComRespDto queryDeptListComRespDto_1 = null;
        QueryInductionRecordListRespDto queryInductionRecordListRespDto_1 = null;
//步骤0: D1-3查部门列表(公共) - queryDeptListCom
        QueryDeptListComRespDto queryDeptListComRespDto = null;
        QueryDeptListComReqDto queryDeptListComReqDto = new QueryDeptListComReqDto();
        queryDeptListComReqDto.setIsArchive("FALSE");//sourceId:42150_1
        if (reqDto != null) {
            queryDeptListComReqDto.setParentDeptId(reqDto.getParentDeptId());//sourceId:42149_1
        }

        /*D1-3查询部门列表（查子部门）[1513]   */
        Assert.isNull(queryDeptListComReqDto.getParentDeptId(), "B1-3查询存档部门条件（管理）-D1-3查询部门列表（查子部门）-父级部门ID不能为空", false);
        Assert.isNull(queryDeptListComReqDto.getIsArchive(), "B1-3查询存档部门条件（管理）-D1-3查询部门列表（查子部门）-是否存档不能为空", false);
        queryDeptListComRespDto = fwBaseOrgClient.queryDeptListCom(queryDeptListComReqDto).getData();

        queryDeptListComRespDto_1 = queryDeptListComRespDto;

//步骤1: D1-3查就职记录列表 - queryInductionRecordList
        QueryInductionRecordListRespDto queryInductionRecordListRespDto = null;
        QueryInductionRecordListReqDto queryInductionRecordListReqDto = new QueryInductionRecordListReqDto();
        queryInductionRecordListReqDto.setInductionUnitTypeCode("DEPT");//sourceId:40967_1
        queryInductionRecordListReqDto.setIsArchive("FALSE");//sourceId:40960_1
        if (reqDto != null) {
            queryInductionRecordListReqDto.setEntityId(reqDto.getParentDeptId());//sourceId:40942_1
        }

        /*D1-3查询就职记录列表（公共-查成员）[1505]   */
        Assert.isNull(queryInductionRecordListReqDto.getInductionUnitTypeCode(), "B1-3查询存档部门条件（管理）-D1-3查询就职记录列表（公共-查成员）-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListReqDto.getEntityId(), "B1-3查询存档部门条件（管理）-D1-3查询就职记录列表（公共-查成员）-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryInductionRecordListReqDto.getIsArchive(), "B1-3查询存档部门条件（管理）-D1-3查询就职记录列表（公共-查成员）-是否存档不能为空", false);
        queryInductionRecordListRespDto = fwBaseInductionRecordClient.queryInductionRecordList(queryInductionRecordListReqDto).getData();

        queryInductionRecordListRespDto_1 = queryInductionRecordListRespDto;

        BffQueryArchiveDeptRespDto retData = new BffQueryArchiveDeptRespDto();
        if (queryDeptListComRespDto_1 != null) {
            retData.setDeptList(queryDeptListComRespDto_1.getDeptList().stream().map(item -> item.getDeptId())
                    .collect(Collectors.toList()));//sourceId:41958_1
        }
        if (queryInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(inc -> inc.getInductionRecordId()).collect(Collectors.toList()));//sourceId:40968_1
        }


        return retData;
    }

    /**
     * B1-3查询一级部门列表（边界）[1093]
     * gen by moon at 10/20/2022, 7:53:16 PM
     */
    @Trace(operationName = "B1-3查询一级部门列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryOneLevelDeptListRespDto queryOneLevelDeptList(BffQueryOneLevelDeptListReqDto reqDto) {


        QueryDeptListComRespDto queryDeptListComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:172540_1
        queryOrgDetailComReqDto.setUsingLockStatus("UNLOCK");//sourceId:191917_1

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3查询一级部门列表（边界）-D1-3查询组织详情(公共)-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailComReqDto.getUsingLockStatus(), "B1-3查询一级部门列表（边界）-D1-3查询组织详情(公共)-使用锁定状态不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


//步骤1: D1-3查部门列表(公共) - queryDeptListCom
        QueryDeptListComRespDto queryDeptListComRespDto = null;
        QueryDeptListComReqDto queryDeptListComReqDto = new QueryDeptListComReqDto();
        queryDeptListComReqDto.setLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:376734_1
        queryDeptListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:45902_1
        if (reqDto != null) {
            queryDeptListComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:45794_1
        }

        /*D1-3查部门列表(公共)[1513]   */
        Assert.isNull(queryDeptListComReqDto.getTypeDictionaryId(), "B1-3查询一级部门列表（边界）-D1-3查部门列表(公共)-部门类型字典ID不能为空", false);
        Assert.isNull(queryDeptListComReqDto.getLevelNumber(), "B1-3查询一级部门列表（边界）-D1-3查部门列表(公共)-层级不能为空", false);
        Assert.isNull(queryDeptListComReqDto.getSubjectLifeCycle(), "B1-3查询一级部门列表（边界）-D1-3查部门列表(公共)-主体生命周期不能为空", false);
        queryDeptListComRespDto = fwBaseOrgClient.queryDeptListCom(queryDeptListComReqDto).getData();


        queryDeptListComRespDto_1 = queryDeptListComRespDto;

        BffQueryOneLevelDeptListRespDto retData = new BffQueryOneLevelDeptListRespDto();
        if (queryDeptListComRespDto_1 != null) {
            retData.setOneLevelDeptList(queryDeptListComRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffOneLevelDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:115269_1
        }


        return retData;
    }

    /**
     * B1-3存档部门（管理）[1040]
     * gen by moon at 9/2/2022, 8:54:35 PM
     */
    @Trace(operationName = "B1-3存档部门（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffArchiveDeptRespDto archiveDept(BffArchiveDeptReqDto reqDto) {


        //步骤0: D1-3存档部门 - archiveDept
        ArchiveDeptRespDto archiveDeptRespDto = null;
        ArchiveDeptReqDto archiveDeptReqDto = new ArchiveDeptReqDto();
        if (reqDto != null) {
            archiveDeptReqDto.setDeptId(reqDto.getDeptId());//sourceId:42368_1
        }

        /*D1-3存档部门[1520]   */
        Assert.isNull(archiveDeptReqDto.getDeptId(), "B1-3存档部门（管理）-D1-3存档部门-部门ID不能为空", false);
        archiveDeptRespDto = fwBaseOrgClient.archiveDept(archiveDeptReqDto).getData();


        BffArchiveDeptRespDto retData = new BffArchiveDeptRespDto();


        return retData;
    }

    /**
     * B1-3查询部门详情[658]
     * gen by moon at 9/22/2023, 6:49:51 PM
     */
    @Trace(operationName = "B1-3查询部门详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptDetailRespDto queryDeptDetail(BffQueryDeptDetailReqDto reqDto) {


        QueryDeptDetailRespDto queryDeptDetailRespDto_1 = null;
//步骤0: D1-3查询部门详情 - queryDeptDetail
        QueryDeptDetailRespDto queryDeptDetailRespDto = null;
        QueryDeptDetailReqDto queryDeptDetailReqDto = new QueryDeptDetailReqDto();
        if (reqDto != null) {
            queryDeptDetailReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:323790_1
        }

        /*D1-3查询部门详情[4552]   */
        Assert.isNull(queryDeptDetailReqDto.getDeptId(), "B1-3查询部门详情-D1-3查询部门详情-部门ID不能为空", false);
        queryDeptDetailRespDto = fwBaseOrgClient.queryDeptDetail(queryDeptDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryDeptDetailRespDto_1 = queryDeptDetailRespDto;

        BffQueryDeptDetailRespDto retData = new BffQueryDeptDetailRespDto();
        if (queryDeptDetailRespDto_1 != null) {
            retData.setDeptId(queryDeptDetailRespDto_1.getDeptId());//SimpleFieldAssign//sourceId:323807_1
            retData.setDeptNumber(queryDeptDetailRespDto_1.getDeptNumber());//SimpleFieldAssign//sourceId:323808_1
            retData.setDeptName(queryDeptDetailRespDto_1.getDeptName());//SimpleFieldAssign//sourceId:323809_1
            retData.setDeptEnName(queryDeptDetailRespDto_1.getDeptEnName());//SimpleFieldAssign//sourceId:323810_1
            retData.setDeptShortName(queryDeptDetailRespDto_1.getDeptShortName());//SimpleFieldAssign//sourceId:323811_1
            retData.setDeptDutyDesc(queryDeptDetailRespDto_1.getDeptDutyDesc());//SimpleFieldAssign//sourceId:323812_1
            retData.setDeptTargetDesc(queryDeptDetailRespDto_1.getDeptTargetDesc());//SimpleFieldAssign//sourceId:323813_1
            retData.setRoleMemberId(queryDeptDetailRespDto_1.getRoleMemberId());//SimpleFieldAssign//sourceId:323814_1
            retData.setIdCardName(queryDeptDetailRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:1128897_1
            retData.setNickName(queryDeptDetailRespDto_1.getNickName());//SimpleFieldAssign//sourceId:1128898_1
            retData.setUserFace(queryDeptDetailRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:1128899_1
            retData.setDirectorIdCardName(queryDeptDetailRespDto_1.getDirectorIdCardName());//SimpleFieldAssign//sourceId:323818_1
            retData.setPartyAndYouthDirectorIdCardName(queryDeptDetailRespDto_1.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1128903_1
        }


        return retData;
    }

    /**
     * B1-3修改部门（管理）[664]
     * gen by moon at 8/23/2024, 12:12:04 AM
     */
    @Trace(operationName = "B1-3修改部门（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateDeptRespDto updateDept(BffUpdateDeptReqDto reqDto) {


        //virtualUsage D1-3修改部门  60095
        UpdateDeptRespDto updateDeptRespDto = null;
        UpdateDeptReqDto updateDeptReqDto = new UpdateDeptReqDto();
        if (reqDto != null) {
            updateDeptReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:23563_1_60095
            updateDeptReqDto.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:301892_1_60095
            updateDeptReqDto.setDeptEnName(reqDto.getDeptEnName());//SimpleFieldAssign//sourceId:23570_1_60095
            updateDeptReqDto.setDeptShortName(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:23571_1_60095
            updateDeptReqDto.setDeptNumber(reqDto.getDeptNumber());//SimpleFieldAssign//sourceId:23568_1_60095
            updateDeptReqDto.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:23565_1_60095
            updateDeptReqDto.setIsDirectlyMember(reqDto.getIsDirectlyMember());//SimpleFieldAssign//sourceId:23566_1_60095
            updateDeptReqDto.setIsCreateLowerDept(reqDto.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:23567_1_60095
            updateDeptReqDto.setDeptBusinessIdentity(reqDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1983997_1_60095
            updateDeptReqDto.setDeptDutyDesc(reqDto.getDeptDutyDesc());//SimpleFieldAssign//sourceId:23572_1_60095
            updateDeptReqDto.setDeptTargetDesc(reqDto.getDeptTargetDesc());//SimpleFieldAssign//sourceId:23573_1_60095
            updateDeptReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:23564_1_60095
            updateDeptReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:49694_1_60095
            updateDeptReqDto.setDirectorIdCardName(reqDto.getDirectorIdCardName());//SimpleFieldAssign//sourceId:160122_1_60095
        }

        /*D1-3修改部门[662]   */
        Assert.isNull(updateDeptReqDto.getDeptId(), "B1-3修改部门（管理）-D1-3修改部门-部门ID不能为空", false);
        updateDeptRespDto = fwBaseOrgClient.updateDept(updateDeptReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
            //if(B1-3修改部门（管理）.主体生命周期 等于 当前有效)  60096

            ImplementIniOrgWorkTaskMsgLocationByLoginComRespDto implementIniOrgWorkTaskMsgLocationByLoginComRespDto = null;
            ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto implementIniOrgWorkTaskMsgLocationByLoginComReqDto = new ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto();
            implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setSurfaceCode("ORG_OR_DEPT");//sourceId:1499948_1_60097
            implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1499947_1_60097
            if (reqDto != null) {
                implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1499949_1_60097
            }

            /*D2-执行初始化组织工作任务消息数量(公共)[7877]   */
            Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getSurfaceCode(), "B1-3修改部门（管理）-D2-执行初始化组织工作任务消息数量(公共)-归属内容类型编码不能为空", false);
            Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getEntityId(), "B1-3修改部门（管理）-D2-执行初始化组织工作任务消息数量(公共)-归属内容ID不能为空", false);
            Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getSpaceId(), "B1-3修改部门（管理）-D2-执行初始化组织工作任务消息数量(公共)-创建于空间ID不能为空", false);
            implementIniOrgWorkTaskMsgLocationByLoginComRespDto = fwCompMessageClient.implementIniOrgWorkTaskMsgLocationByLoginCom(implementIniOrgWorkTaskMsgLocationByLoginComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }
        BffUpdateDeptRespDto retData = new BffUpdateDeptRespDto();


        return retData;
    }

    /**
     * B1-3查询管理模式部门详情(管理)[791]
     * gen by moon at 8/23/2024, 12:12:08 AM
     */
    @Trace(operationName = "B1-3查询管理模式部门详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptMgtDetailRespDto queryDeptMgtDetail(BffQueryDeptMgtDetailReqDto reqDto) {


        QueryDeptSetDetailRespDto queryDeptSetDetailRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D1-3查询部门设置详情(管理) - queryDeptSetDetail
        QueryDeptSetDetailRespDto queryDeptSetDetailRespDto = null;
        QueryDeptSetDetailReqDto queryDeptSetDetailReqDto = new QueryDeptSetDetailReqDto();
        if (reqDto != null) {
            queryDeptSetDetailReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:35421_1
        }

        /*D1-3查询部门设置详情(管理)[657]   */
        Assert.isNull(queryDeptSetDetailReqDto.getDeptId(), "B1-3查询管理模式部门详情(管理)-D1-3查询部门设置详情(管理)-部门ID不能为空", false);
        queryDeptSetDetailRespDto = fwBaseOrgClient.queryDeptSetDetail(queryDeptSetDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryDeptSetDetailRespDto_1 = queryDeptSetDetailRespDto;

//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        if (queryDeptSetDetailRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            if (queryDeptSetDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryDeptSetDetailRespDto.getOperationInductionId());//SimpleFieldAssign//sourceId:35513_1
            }

            /*D1-3查询个人就职记录信息详情（公共）[715]   */

            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

        BffQueryDeptMgtDetailRespDto retData = new BffQueryDeptMgtDetailRespDto();
        if (queryDeptSetDetailRespDto_1 != null) {
            retData.setDeptId(queryDeptSetDetailRespDto_1.getDeptId());//SimpleFieldAssign//sourceId:35493_1
            retData.setDeptCode(queryDeptSetDetailRespDto_1.getDeptCode());//SimpleFieldAssign//sourceId:104501_1
            retData.setDeptNumber(queryDeptSetDetailRespDto_1.getDeptNumber());//SimpleFieldAssign//sourceId:1135327_1
            retData.setDeptShortName(queryDeptSetDetailRespDto_1.getDeptShortName());//SimpleFieldAssign//sourceId:1135328_1
            retData.setDeptName(queryDeptSetDetailRespDto_1.getDeptName());//SimpleFieldAssign//sourceId:1135329_1
            retData.setDeptEnName(queryDeptSetDetailRespDto_1.getDeptEnName());//SimpleFieldAssign//sourceId:1135330_1
            retData.setDeptDutyDesc(queryDeptSetDetailRespDto_1.getDeptDutyDesc());//SimpleFieldAssign//sourceId:1135331_1
            retData.setDeptTargetDesc(queryDeptSetDetailRespDto_1.getDeptTargetDesc());//SimpleFieldAssign//sourceId:1135332_1
            retData.setDirectorIdCardName(queryDeptSetDetailRespDto_1.getDirectorIdCardName());//SimpleFieldAssign//sourceId:1135333_1
            retData.setPartyAndYouthDirectorIdCardName(queryDeptSetDetailRespDto_1.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1135334_1
            retData.setOperationInductionId(queryDeptSetDetailRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:35520_1
            retData.setRoleMemberId(queryDeptSetDetailRespDto_1.getRoleMemberId());//SimpleFieldAssign//sourceId:1135335_1
            retData.setUserFace(queryDeptSetDetailRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:1135338_1
            retData.setIdCardName(queryDeptSetDetailRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:1135336_1
            retData.setNickName(queryDeptSetDetailRespDto_1.getNickName());//SimpleFieldAssign//sourceId:1135337_1
            retData.setIsDirectlyMember(queryDeptSetDetailRespDto_1.getIsDirectlyMember());//SimpleFieldAssign//sourceId:157766_1
            retData.setIsCreateLowerDept(queryDeptSetDetailRespDto_1.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:158265_1
            retData.setDeptBusinessIdentity(queryDeptSetDetailRespDto_1.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1984025_1
            retData.setDeptBusinessIdentityName(queryDeptSetDetailRespDto_1.getDeptBusinessIdentityName());//SimpleFieldAssign//sourceId:1984026_1
            retData.setSubjectLifeCycle(queryDeptSetDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:53666_1
            retData.setOrderNumber(queryDeptSetDetailRespDto_1.getOrderNumber());//SimpleFieldAssign//sourceId:160202_1
            retData.setOperateTime(queryDeptSetDetailRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:35521_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setOperationName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:160000_1
            retData.setOperationNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:160001_1
            retData.setOperationUserFase(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:160002_1
        }


        return retData;
    }

    /**
     * B1-3查询管理模式部门树状结构(管理)[308]
     * gen by moon at 8/20/2022, 5:53:22 PM
     */
    @Trace(operationName = "B1-3查询管理模式部门树状结构(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptMgtTreeListRespDto queryDeptMgtTreeList(BffQueryDeptMgtTreeListReqDto reqDto) {


        QueryMgtDeptTreeListRespDto queryMgtDeptTreeListRespDto_1 = null;
//步骤0: D1-3查询部门树状结构列表（管理） - queryMgtDeptTreeList
        QueryMgtDeptTreeListRespDto queryMgtDeptTreeListRespDto = null;
        QueryMgtDeptTreeListReqDto queryMgtDeptTreeListReqDto = new QueryMgtDeptTreeListReqDto();
        if (reqDto != null) {
            queryMgtDeptTreeListReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:158301_1
            queryMgtDeptTreeListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:160008_1
        }

        /*D1-3查询部门树状结构列表（管理）[1521]   */
        Assert.isNull(queryMgtDeptTreeListReqDto.getOrganizationId(), "B1-3查询管理模式部门树状结构(管理)-D1-3查询部门树状结构列表（管理）-组织ID不能为空", false);
        Assert.isNull(queryMgtDeptTreeListReqDto.getTypeDictionaryId(), "B1-3查询管理模式部门树状结构(管理)-D1-3查询部门树状结构列表（管理）-部门类型字典ID不能为空", false);
        queryMgtDeptTreeListRespDto = fwBaseOrgClient.queryMgtDeptTreeList(queryMgtDeptTreeListReqDto).getData();

        queryMgtDeptTreeListRespDto_1 = queryMgtDeptTreeListRespDto;

        BffQueryDeptMgtTreeListRespDto retData = new BffQueryDeptMgtTreeListRespDto();
        if (queryMgtDeptTreeListRespDto_1 != null) {
            retData.setDeptList(queryMgtDeptTreeListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//sourceId:158306_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3判断部门开始管理权限(管理)[3718]
     * gen by moon at 8/25/2022, 10:15:58 PM
     */
    @Trace(operationName = "B1-3判断部门开始管理权限(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffJudgeEnterDeptMgtPowerRespDto judgeEnterDeptMgtPower(BffJudgeEnterDeptMgtPowerReqDto reqDto) {


        JudgeEnterDeptMgtPowerRespDto judgeEnterDeptMgtPowerRespDto_1 = null;
//步骤0: D1-3判断进入部门管理模式权限(管理) - judgeEnterDeptMgtPower
        JudgeEnterDeptMgtPowerRespDto judgeEnterDeptMgtPowerRespDto = null;
        JudgeEnterDeptMgtPowerReqDto judgeEnterDeptMgtPowerReqDto = new JudgeEnterDeptMgtPowerReqDto();
        if (reqDto != null) {
            judgeEnterDeptMgtPowerReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:252860_1
        }

        /*D1-3判断进入部门管理模式权限(管理)[3730]   */
        Assert.isNull(judgeEnterDeptMgtPowerReqDto.getOrganizationId(), "B1-3判断部门开始管理权限(管理)-D1-3判断进入部门管理模式权限(管理)-组织ID不能为空", false);
        judgeEnterDeptMgtPowerRespDto = fwBaseOrgClient.judgeEnterDeptMgtPower(judgeEnterDeptMgtPowerReqDto).getData();

        judgeEnterDeptMgtPowerRespDto_1 = judgeEnterDeptMgtPowerRespDto;

        BffJudgeEnterDeptMgtPowerRespDto retData = new BffJudgeEnterDeptMgtPowerRespDto();
        if (judgeEnterDeptMgtPowerRespDto_1 != null) {
            retData.setDeptEnterMgtPowerType(judgeEnterDeptMgtPowerRespDto_1.getDeptEnterMgtPowerType());//sourceId:254735_1
        }


        return retData;
    }

    /**
     * B1-3查询最高组织详情[4149]
     * gen by moon at 8/20/2022, 5:53:44 PM
     */
    @Trace(operationName = "B1-3查询最高组织详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQuerySupremeOrgDetailRespDto querySupremeOrgDetail(BffQuerySupremeOrgDetailReqDto reqDto) {


        QuerySupremeOrgDetailRespDto querySupremeOrgDetailRespDto_1 = null;
//步骤0: D1-3查询最高组织详情 - querySupremeOrgDetail
        QuerySupremeOrgDetailRespDto querySupremeOrgDetailRespDto = null;
        QuerySupremeOrgDetailReqDto querySupremeOrgDetailReqDto = new QuerySupremeOrgDetailReqDto();


        /*D1-3查询最高组织详情[4148]   */

        querySupremeOrgDetailRespDto = fwBaseOrgClient.querySupremeOrgDetail(querySupremeOrgDetailReqDto).getData();

        querySupremeOrgDetailRespDto_1 = querySupremeOrgDetailRespDto;

        BffQuerySupremeOrgDetailRespDto retData = new BffQuerySupremeOrgDetailRespDto();
        if (querySupremeOrgDetailRespDto_1 != null) {
            retData.setOrganizationId(querySupremeOrgDetailRespDto_1.getOrganizationId());//sourceId:244827_1
            retData.setOrganizationName(querySupremeOrgDetailRespDto_1.getOrganizationName());//sourceId:247090_1
        }


        return retData;
    }

    /**
     * B1-3更新组织管理检查项状态等(管理)[4157]
     * gen by moon at 9/1/2022, 7:22:04 PM
     */
    @Trace(operationName = "B1-3更新组织管理检查项状态等(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffRefreshOrgMgtCheckItemEtcRespDto refreshOrgMgtCheckItemEtc(BffRefreshOrgMgtCheckItemEtcReqDto reqDto) {


        //步骤0: D1-3更新组织管理检查项状态等 - refreshOrgMgtCheckItemEtc
        RefreshOrgMgtCheckItemEtcRespDto refreshOrgMgtCheckItemEtcRespDto = null;
        RefreshOrgMgtCheckItemEtcReqDto refreshOrgMgtCheckItemEtcReqDto = new RefreshOrgMgtCheckItemEtcReqDto();
        if (reqDto != null) {
            refreshOrgMgtCheckItemEtcReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:252980_1
        }

        /*D1-3更新组织管理检查项状态等[4158]   */
        Assert.isNull(refreshOrgMgtCheckItemEtcReqDto.getOrganizationId(), "B1-3更新组织管理检查项状态等(管理)-D1-3更新组织管理检查项状态等-组织ID不能为空", false);
        refreshOrgMgtCheckItemEtcRespDto = fwBaseOrgClient.refreshOrgMgtCheckItemEtc(refreshOrgMgtCheckItemEtcReqDto).getData();


        BffRefreshOrgMgtCheckItemEtcRespDto retData = new BffRefreshOrgMgtCheckItemEtcRespDto();


        return retData;
    }

    /**
     * B1查询一级部门权限管理入口详情(管理)[4166]
     * gen by moon at 8/24/2022, 11:48:36 PM
     */
    @Trace(operationName = "B1查询一级部门权限管理入口详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryFirstDeptPowerManagePortalDetailRespDto queryFirstDeptPowerManagePortalDetail(BffQueryFirstDeptPowerManagePortalDetailReqDto reqDto) {


        QueryFirstDeptPowerManagePortalDetailRespDto queryFirstDeptPowerManagePortalDetailRespDto_1 = null;
//步骤0: D1查询一级部门权限管理入口 - queryFirstDeptPowerManagePortalDetail
        QueryFirstDeptPowerManagePortalDetailRespDto queryFirstDeptPowerManagePortalDetailRespDto = null;
        QueryFirstDeptPowerManagePortalDetailReqDto queryFirstDeptPowerManagePortalDetailReqDto = new QueryFirstDeptPowerManagePortalDetailReqDto();
        if (reqDto != null) {
            queryFirstDeptPowerManagePortalDetailReqDto.setDeptId(reqDto.getDeptId());//sourceId:255190_1
            queryFirstDeptPowerManagePortalDetailReqDto.setInductionUnitTypeCode(reqDto.getInductionUnitTypeCode());//sourceId:258644_1
        }

        /*D1查询一级部门权限管理入口[4165]   */
        Assert.isNull(queryFirstDeptPowerManagePortalDetailReqDto.getInductionUnitTypeCode(), "B1查询一级部门权限管理入口详情(管理)-D1查询一级部门权限管理入口-就职单位类型实例不能为空", false);
        queryFirstDeptPowerManagePortalDetailRespDto = fwBaseOrgClient.queryFirstDeptPowerManagePortalDetail(queryFirstDeptPowerManagePortalDetailReqDto).getData();

        queryFirstDeptPowerManagePortalDetailRespDto_1 = queryFirstDeptPowerManagePortalDetailRespDto;

        BffQueryFirstDeptPowerManagePortalDetailRespDto retData = new BffQueryFirstDeptPowerManagePortalDetailRespDto();
        if (queryFirstDeptPowerManagePortalDetailRespDto_1 != null) {
            retData.setDeptId(queryFirstDeptPowerManagePortalDetailRespDto_1.getDeptId());//sourceId:258903_1
            retData.setDeptCode(queryFirstDeptPowerManagePortalDetailRespDto_1.getDeptCode());//sourceId:258904_1
            retData.setDeptShortName(queryFirstDeptPowerManagePortalDetailRespDto_1.getDeptShortName());//sourceId:258905_1
        }


        return retData;
    }

    /**
     * B1-3修改组织当前管理对象部门等(管理)[4167]
     * gen by moon at 8/28/2022, 12:12:42 AM
     */
    @Trace(operationName = "B1-3修改组织当前管理对象部门等(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateOrgPresentMgtObjTypeRespDto updateOrgPresentMgtObjType(BffUpdateOrgPresentMgtObjTypeReqDto reqDto) {


        //步骤0: D1-3修改组织当前管理对象类型等 - updateOrgPresentMgtObjType
        UpdateOrgPresentMgtObjTypeRespDto updateOrgPresentMgtObjTypeRespDto = null;
        UpdateOrgPresentMgtObjTypeReqDto updateOrgPresentMgtObjTypeReqDto = new UpdateOrgPresentMgtObjTypeReqDto();
        if (reqDto != null) {
            updateOrgPresentMgtObjTypeReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:255092_1
        }

        /*D1-3修改组织当前管理对象类型等[4168]   */
        Assert.isNull(updateOrgPresentMgtObjTypeReqDto.getOrganizationId(), "B1-3修改组织当前管理对象部门等(管理)-D1-3修改组织当前管理对象类型等-组织ID不能为空", false);
        updateOrgPresentMgtObjTypeRespDto = fwBaseOrgClient.updateOrgPresentMgtObjType(updateOrgPresentMgtObjTypeReqDto).getData();


        BffUpdateOrgPresentMgtObjTypeRespDto retData = new BffUpdateOrgPresentMgtObjTypeRespDto();


        return retData;
    }

    /**
     * B1-3查询组织使用锁定原因[4202]
     * gen by moon at 8/25/2022, 10:16:00 PM
     */
    @Trace(operationName = "B1-3查询组织使用锁定原因")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryOrgUseLockCauseDetailRespDto queryOrgUseLockCauseDetail(BffQueryOrgUseLockCauseDetailReqDto reqDto) {


        QueryOrgDetailComRespDto queryOrgDetailComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        if (reqDto != null) {
            queryOrgDetailComReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:259470_1
        }

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3查询组织使用锁定原因-D1-3查询组织详情(公共)-组织ID不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();

        queryOrgDetailComRespDto_1 = queryOrgDetailComRespDto;

        BffQueryOrgUseLockCauseDetailRespDto retData = new BffQueryOrgUseLockCauseDetailRespDto();
        if (queryOrgDetailComRespDto_1 != null) {
            retData.setOrganizationId(queryOrgDetailComRespDto_1.getOrganizationId());//sourceId:259479_1
            retData.setUsingLockStatus(queryOrgDetailComRespDto_1.getUsingLockStatus());//sourceId:259480_1
            retData.setReasonOfUsingLock(queryOrgDetailComRespDto_1.getReasonOfUsingLock());//sourceId:259481_1
        }


        return retData;
    }

    /**
     * B1-查询组织架构发布进度详情[4234]
     * gen by moon at 5/31/2023, 8:23:37 PM
     */
    @Trace(operationName = "B1-查询组织架构发布进度详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryOrgStrReleaseProgressDetailRespDto queryOrgStrReleaseProgressDetail(BffQueryOrgStrReleaseProgressDetailReqDto reqDto) {


        QueryOrgDetailComRespDto queryOrgDetailComRespDto_1 = null;
        ObtainProgressLoadingBgComRespDto obtainProgressLoadingBgComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        if (reqDto != null) {
            queryOrgDetailComReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:261624_1
        }

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-查询组织架构发布进度详情-D1-3查询组织详情(公共)-组织ID不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryOrgDetailComRespDto_1 = queryOrgDetailComRespDto;

//步骤1: D2获取进度加载背景图(公共) - obtainProgressLoadingBgCom
        ObtainProgressLoadingBgComRespDto obtainProgressLoadingBgComRespDto = null;
        if (queryOrgDetailComRespDto != null) {
            ObtainProgressLoadingBgComReqDto obtainProgressLoadingBgComReqDto = new ObtainProgressLoadingBgComReqDto();
            obtainProgressLoadingBgComReqDto.setConfItemCode("GENERAL_PROGRESS_BG");//CUSTOM_CONVENTION//sourceId:999066_1
            if (queryOrgDetailComRespDto != null) {
                obtainProgressLoadingBgComReqDto.setExtensionField1(queryOrgDetailComRespDto.getBatchProcessProgress() != null ? String.valueOf(queryOrgDetailComRespDto.getBatchProcessProgress()) : "");//SimpleFieldAssign//sourceId:999065_1
            }

            /*D2获取进度加载背景图(公共)[6957]   */
            Assert.isNull(obtainProgressLoadingBgComReqDto.getExtensionField1(), "B1-查询组织架构发布进度详情-D2获取进度加载背景图(公共)-当前进度值不能为空", false);
            Assert.isNull(obtainProgressLoadingBgComReqDto.getConfItemCode(), "B1-查询组织架构发布进度详情-D2获取进度加载背景图(公共)-配置项标识不能为空", false);
            obtainProgressLoadingBgComRespDto = fwCompConfSchemeClient.obtainProgressLoadingBgCom(obtainProgressLoadingBgComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            obtainProgressLoadingBgComRespDto_1 = obtainProgressLoadingBgComRespDto;
        }

        BffQueryOrgStrReleaseProgressDetailRespDto retData = new BffQueryOrgStrReleaseProgressDetailRespDto();
        if (queryOrgDetailComRespDto_1 != null) {
            retData.setOrganizationId(queryOrgDetailComRespDto_1.getOrganizationId());//SimpleFieldAssign//sourceId:261635_1
            retData.setBatchProcessProgress(queryOrgDetailComRespDto_1.getBatchProcessProgress());//SimpleFieldAssign//sourceId:261636_1
            retData.setDelBatchIsDone(queryOrgDetailComRespDto_1.getDelBatchIsDone());//SimpleFieldAssign//sourceId:261637_1
        }
        if (obtainProgressLoadingBgComRespDto_1 != null) {
            retData.setBackGroundAddress(CommonFunctionHelper.getFilePath(obtainProgressLoadingBgComRespDto_1.getBackGroundAddress()));//SimpleFieldAssign//sourceId:999068_1
        }


        return retData;
    }

    /**
     * B1-3暂停成员对外使用(管理)[1120]
     * gen by moon at 9/11/2022, 5:18:43 AM
     */
    @Trace(operationName = "B1-3暂停成员对外使用(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffSuspendExternalUseMembersRespDto suspendExternalUseMembers(BffSuspendExternalUseMembersReqDto reqDto) {


        //步骤0: D1-3修改组织 - updateOrg
        UpdateOrgRespDto updateOrgRespDto = null;
        UpdateOrgReqDto updateOrgReqDto = new UpdateOrgReqDto();
        updateOrgReqDto.setUsingLockStatus("COMMON_LOCK");//sourceId:43756_1
        updateOrgReqDto.setReasonOfUsingLock("组织架构正在维护，暂停使用，请耐心等待～");//CUSTOM_CONVENTION//sourceId:43755_1
        if (reqDto != null) {
            updateOrgReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:43752_1
        }

        /*D1-3修改组织[797]   */
        Assert.isNull(updateOrgReqDto.getOrganizationId(), "B1-3暂停成员对外使用(管理)-D1-3修改组织-组织ID不能为空", false);
        Assert.isNull(updateOrgReqDto.getUsingLockStatus(), "B1-3暂停成员对外使用(管理)-D1-3修改组织-使用锁定状态不能为空", false);
        Assert.isNull(updateOrgReqDto.getReasonOfUsingLock(), "B1-3暂停成员对外使用(管理)-D1-3修改组织-使用锁定原因不能为空", false);
        updateOrgRespDto = fwBaseOrgClient.updateOrg(updateOrgReqDto).getData();


        BffSuspendExternalUseMembersRespDto retData = new BffSuspendExternalUseMembersRespDto();


        return retData;
    }

    /**
     * B1-3恢复成员对外使用(管理)[1121]
     * gen by moon at 9/11/2022, 5:18:45 AM
     */
    @Trace(operationName = "B1-3恢复成员对外使用(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffRecoveryExternalUseMembersRespDto recoveryExternalUseMembers(BffRecoveryExternalUseMembersReqDto reqDto) {


        //步骤0: D1-3修改组织 - updateOrg
        UpdateOrgRespDto updateOrgRespDto = null;
        UpdateOrgReqDto updateOrgReqDto = new UpdateOrgReqDto();
        updateOrgReqDto.setUsingLockStatus("UNLOCK");//sourceId:43777_1
        updateOrgReqDto.setReasonOfUsingLock("---");//NULL//sourceId:43776_1
        if (reqDto != null) {
            updateOrgReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:43773_1
        }

        /*D1-3修改组织[797]   */
        Assert.isNull(updateOrgReqDto.getOrganizationId(), "B1-3恢复成员对外使用(管理)-D1-3修改组织-组织ID不能为空", false);
        Assert.isNull(updateOrgReqDto.getUsingLockStatus(), "B1-3恢复成员对外使用(管理)-D1-3修改组织-使用锁定状态不能为空", false);
        Assert.isNull(updateOrgReqDto.getReasonOfUsingLock(), "B1-3恢复成员对外使用(管理)-D1-3修改组织-使用锁定原因不能为空", false);
        updateOrgRespDto = fwBaseOrgClient.updateOrg(updateOrgReqDto).getData();


        BffRecoveryExternalUseMembersRespDto retData = new BffRecoveryExternalUseMembersRespDto();


        return retData;
    }

    /**
     * B1-3查询部门边界树状结构(边界)[4084]
     * gen by moon at 9/19/2022, 7:29:13 PM
     */
    @Trace(operationName = "B1-3查询部门边界树状结构(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptBorderTreeListBorderRespDto queryDeptBorderTreeListBorder(BffQueryDeptBorderTreeListBorderReqDto reqDto) {
        reqDto.setSubjectLifeCycle("CURRENTLY_VALID");

        QuerySubordinateDeptTreeListComBorderRespDto querySubordinateDeptTreeListComBorderRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:235767_1
        queryOrgDetailComReqDto.setUsingLockStatus("UNLOCK");//sourceId:235774_1

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3查询部门边界树状结构(边界)-D1-3查询组织详情(公共)-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailComReqDto.getUsingLockStatus(), "B1-3查询部门边界树状结构(边界)-D1-3查询组织详情(公共)-使用锁定状态不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


//步骤1: D1-3查询下级部门树状结构(公共)(边界) - querySubordinateDeptTreeListComBorder
        QuerySubordinateDeptTreeListComBorderRespDto querySubordinateDeptTreeListComBorderRespDto = null;
        QuerySubordinateDeptTreeListComBorderReqDto querySubordinateDeptTreeListComBorderReqDto = new QuerySubordinateDeptTreeListComBorderReqDto();
        querySubordinateDeptTreeListComBorderReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:221707_1
        if (reqDto != null) {
            querySubordinateDeptTreeListComBorderReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:221705_1
            querySubordinateDeptTreeListComBorderReqDto.setParentDeptId(reqDto.getParentDeptId());//sourceId:221706_1
            querySubordinateDeptTreeListComBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:221703_1
        }

        /*D1-3查询下级部门树状结构(公共)(边界)[1845]   */
        Assert.isNull(querySubordinateDeptTreeListComBorderReqDto.getOrganizationId(), "B1-3查询部门边界树状结构(边界)-D1-3查询下级部门树状结构(公共)(边界)-组织ID不能为空", false);
        Assert.isNull(querySubordinateDeptTreeListComBorderReqDto.getSubjectLifeCycle(), "B1-3查询部门边界树状结构(边界)-D1-3查询下级部门树状结构(公共)(边界)-主体生命周期不能为空", false);
        querySubordinateDeptTreeListComBorderRespDto = fwBaseOrgClient.querySubordinateDeptTreeListComBorder(querySubordinateDeptTreeListComBorderReqDto).getData();


        querySubordinateDeptTreeListComBorderRespDto_1 = querySubordinateDeptTreeListComBorderRespDto;

        BffQueryDeptBorderTreeListBorderRespDto retData = new BffQueryDeptBorderTreeListBorderRespDto();
        if (querySubordinateDeptTreeListComBorderRespDto_1 != null) {
            retData.setDeptList(querySubordinateDeptTreeListComBorderRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//sourceId:221711_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3查询下级直属部门列表(边界)[3076]
     * gen by moon at 9/19/2022, 7:28:33 PM
     */
    @Trace(operationName = "B1-3查询下级直属部门列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQuerySubordinateDirectlyDeptListBorderRespDto querySubordinateDirectlyDeptListBorder(BffQuerySubordinateDirectlyDeptListBorderReqDto reqDto) {


        QuerySubordinateDirectlyDeptListRespDto querySubordinateDirectlyDeptListRespDto_1 = null;
//步骤0: D1-3查询下级直属部门列表 - querySubordinateDirectlyDeptList
        QuerySubordinateDirectlyDeptListRespDto querySubordinateDirectlyDeptListRespDto = null;
        QuerySubordinateDirectlyDeptListReqDto querySubordinateDirectlyDeptListReqDto = new QuerySubordinateDirectlyDeptListReqDto();
        querySubordinateDirectlyDeptListReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:234174_1
        if (reqDto != null) {
            querySubordinateDirectlyDeptListReqDto.setParentDeptId(reqDto.getParentDeptId());//sourceId:104258_1
        }

        /*D1-3查询下级直属部门列表[3077]   */
        Assert.isNull(querySubordinateDirectlyDeptListReqDto.getParentDeptId(), "B1-3查询下级直属部门列表(边界)-D1-3查询下级直属部门列表-父级部门ID不能为空", false);
        Assert.isNull(querySubordinateDirectlyDeptListReqDto.getOrganizationId(), "B1-3查询下级直属部门列表(边界)-D1-3查询下级直属部门列表-组织ID不能为空", false);
        querySubordinateDirectlyDeptListRespDto = fwBaseOrgClient.querySubordinateDirectlyDeptList(querySubordinateDirectlyDeptListReqDto).getData();


        querySubordinateDirectlyDeptListRespDto_1 = querySubordinateDirectlyDeptListRespDto;

        BffQuerySubordinateDirectlyDeptListBorderRespDto retData = new BffQuerySubordinateDirectlyDeptListBorderRespDto();
        if (querySubordinateDirectlyDeptListRespDto_1 != null) {
            retData.setDeptList(querySubordinateDirectlyDeptListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//sourceId:104263_1
        }


        return retData;
    }

    /**
     * B1-3部门ID查部门树状结构(边界)[4113]
     * gen by moon at 10/14/2022, 4:05:41 PM
     */
    @Trace(operationName = "B1-3部门ID查部门树状结构(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQuerySuperiorDeptQueryDeptTreeTreeListBorderRespDto querySuperiorDeptQueryDeptTreeTreeListBorder(BffQuerySuperiorDeptQueryDeptTreeTreeListBorderReqDto reqDto) {


        QuerySuperiorDeptQueryDeptTreeTreeListRespDto querySuperiorDeptQueryDeptTreeTreeListRespDto_1 = null;
//步骤0: D1-3部门ID查部门树状结构 - querySuperiorDeptQueryDeptTreeTreeList
        QuerySuperiorDeptQueryDeptTreeTreeListRespDto querySuperiorDeptQueryDeptTreeTreeListRespDto = null;
        QuerySuperiorDeptQueryDeptTreeTreeListReqDto querySuperiorDeptQueryDeptTreeTreeListReqDto = new QuerySuperiorDeptQueryDeptTreeTreeListReqDto();
        if (reqDto != null) {
            querySuperiorDeptQueryDeptTreeTreeListReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:342362_1
        }

        /*D1-3部门ID查部门树状结构[4692]   */
        Assert.isNull(querySuperiorDeptQueryDeptTreeTreeListReqDto.getDeptId(), "B1-3部门ID查部门树状结构(边界)-D1-3部门ID查部门树状结构-部门ID不能为空", false);
        querySuperiorDeptQueryDeptTreeTreeListRespDto = fwBaseOrgClient.querySuperiorDeptQueryDeptTreeTreeList(querySuperiorDeptQueryDeptTreeTreeListReqDto).getData();


        querySuperiorDeptQueryDeptTreeTreeListRespDto_1 = querySuperiorDeptQueryDeptTreeTreeListRespDto;

        BffQuerySuperiorDeptQueryDeptTreeTreeListBorderRespDto retData = new BffQuerySuperiorDeptQueryDeptTreeTreeListBorderRespDto();
        if (querySuperiorDeptQueryDeptTreeTreeListRespDto_1 != null) {
            retData.setDeptList(querySuperiorDeptQueryDeptTreeTreeListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:377885_1
            retData.setReasonOfUsingLock(querySuperiorDeptQueryDeptTreeTreeListRespDto_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377886_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3部门ID查询直属部门列表(边界)[4114]
     * gen by moon at 10/14/2022, 4:05:44 PM
     */
    @Trace(operationName = "B1-3部门ID查询直属部门列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQuerySuperiorDeptMayDivDeptListBorderRespDto querySuperiorDeptMayDivDeptListBorder(BffQuerySuperiorDeptMayDivDeptListBorderReqDto reqDto) {


        QuerySuperiorDeptDirectlyDeptListRespDto querySuperiorDeptDirectlyDeptListRespDto_1 = null;
//步骤0: D1-3部门ID查直属部门列表 - querySuperiorDeptDirectlyDeptList
        QuerySuperiorDeptDirectlyDeptListRespDto querySuperiorDeptDirectlyDeptListRespDto = null;
        QuerySuperiorDeptDirectlyDeptListReqDto querySuperiorDeptDirectlyDeptListReqDto = new QuerySuperiorDeptDirectlyDeptListReqDto();
        if (reqDto != null) {
            querySuperiorDeptDirectlyDeptListReqDto.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:341585_1
        }

        /*D1-3部门ID查直属部门列表[4688]   */
        Assert.isNull(querySuperiorDeptDirectlyDeptListReqDto.getParentDeptId(), "B1-3部门ID查询直属部门列表(边界)-D1-3部门ID查直属部门列表-父级部门ID不能为空", false);
        querySuperiorDeptDirectlyDeptListRespDto = fwBaseOrgClient.querySuperiorDeptDirectlyDeptList(querySuperiorDeptDirectlyDeptListReqDto).getData();


        querySuperiorDeptDirectlyDeptListRespDto_1 = querySuperiorDeptDirectlyDeptListRespDto;

        BffQuerySuperiorDeptMayDivDeptListBorderRespDto retData = new BffQuerySuperiorDeptMayDivDeptListBorderRespDto();
        if (querySuperiorDeptDirectlyDeptListRespDto_1 != null) {
            retData.setDeptList(querySuperiorDeptDirectlyDeptListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:341588_1
            retData.setReasonOfUsingLock(querySuperiorDeptDirectlyDeptListRespDto_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377635_1
        }


        return retData;
    }

    /**
     * B1-3类型字典查部门树状结构(管理)[4686]
     * gen by moon at 10/14/2022, 4:05:48 PM
     */
    @Trace(operationName = "B1-3类型字典查部门树状结构(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTypeFieldQueryDeptTreeTreeListRespDto queryTypeFieldQueryDeptTreeTreeList(BffQueryTypeFieldQueryDeptTreeTreeListReqDto reqDto) {


        QueryTypeFieldQueryDeptTreeTreeListRespDto queryTypeFieldQueryDeptTreeTreeListRespDto_1 = null;
//步骤0: D1-3类型字典查部门树状结构列表 - queryTypeFieldQueryDeptTreeTreeList
        QueryTypeFieldQueryDeptTreeTreeListRespDto queryTypeFieldQueryDeptTreeTreeListRespDto = null;
        QueryTypeFieldQueryDeptTreeTreeListReqDto queryTypeFieldQueryDeptTreeTreeListReqDto = new QueryTypeFieldQueryDeptTreeTreeListReqDto();
        if (reqDto != null) {
            queryTypeFieldQueryDeptTreeTreeListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:341952_1
        }

        /*D1-3类型字典查部门树状结构列表[4687]   */
        Assert.isNull(queryTypeFieldQueryDeptTreeTreeListReqDto.getTypeDictionaryId(), "B1-3类型字典查部门树状结构(管理)-D1-3类型字典查部门树状结构列表-部门类型字典ID不能为空", false);
        queryTypeFieldQueryDeptTreeTreeListRespDto = fwBaseOrgClient.queryTypeFieldQueryDeptTreeTreeList(queryTypeFieldQueryDeptTreeTreeListReqDto).getData();


        queryTypeFieldQueryDeptTreeTreeListRespDto_1 = queryTypeFieldQueryDeptTreeTreeListRespDto;

        BffQueryTypeFieldQueryDeptTreeTreeListRespDto retData = new BffQueryTypeFieldQueryDeptTreeTreeListRespDto();
        if (queryTypeFieldQueryDeptTreeTreeListRespDto_1 != null) {
            retData.setDeptList(queryTypeFieldQueryDeptTreeTreeListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:341684_1
            retData.setReasonOfUsingLock(queryTypeFieldQueryDeptTreeTreeListRespDto_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377271_1
        }


        List<Object> allNodes = new ArrayList<>();
        allNodes.addAll(retData.getDeptList());
        List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
        retData.setTreeNode(nodeList);
        retData.setDeptList(null);

        return retData;
    }

    /**
     * B1-3类型字典查直属部门列表(边界)[4689]
     * gen by moon at 10/14/2022, 4:05:50 PM
     */
    @Trace(operationName = "B1-3类型字典查直属部门列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTypeFieldDirectlyDeptListBorderRespDto queryTypeFieldDirectlyDeptListBorder(BffQueryTypeFieldDirectlyDeptListBorderReqDto reqDto) {


        QueryTypeFieldDirectlyDeptListRespDto queryTypeFieldDirectlyDeptListRespDto_1 = null;
//步骤0: D1-3类型字典查直属部门列表 - queryTypeFieldDirectlyDeptList
        QueryTypeFieldDirectlyDeptListRespDto queryTypeFieldDirectlyDeptListRespDto = null;
        QueryTypeFieldDirectlyDeptListReqDto queryTypeFieldDirectlyDeptListReqDto = new QueryTypeFieldDirectlyDeptListReqDto();
        if (reqDto != null) {
            queryTypeFieldDirectlyDeptListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:341624_1
        }

        /*D1-3类型字典查直属部门列表[4690]   */
        Assert.isNull(queryTypeFieldDirectlyDeptListReqDto.getTypeDictionaryId(), "B1-3类型字典查直属部门列表(边界)-D1-3类型字典查直属部门列表-部门类型字典ID不能为空", false);
        queryTypeFieldDirectlyDeptListRespDto = fwBaseOrgClient.queryTypeFieldDirectlyDeptList(queryTypeFieldDirectlyDeptListReqDto).getData();


        queryTypeFieldDirectlyDeptListRespDto_1 = queryTypeFieldDirectlyDeptListRespDto;

        BffQueryTypeFieldDirectlyDeptListBorderRespDto retData = new BffQueryTypeFieldDirectlyDeptListBorderRespDto();
        if (queryTypeFieldDirectlyDeptListRespDto_1 != null) {
            retData.setDeptList(queryTypeFieldDirectlyDeptListRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, BffDeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:341627_1
            retData.setReasonOfUsingLock(queryTypeFieldDirectlyDeptListRespDto_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377608_1
        }


        return retData;
    }

    /**
     * B1-3判断组织架构维护状态(公共)[4927]
     * gen by moon at 10/16/2022, 10:16:15 PM
     */
    @Trace(operationName = "B1-3判断组织架构维护状态(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffJudgeOrgMaintenanceStatusComRespDto judgeOrgMaintenanceStatusCom(BffJudgeOrgMaintenanceStatusComReqDto reqDto) {


        JudgeOrgMaintenanceStatusRespDto judgeOrgMaintenanceStatusRespDto_1 = null;
//步骤0: D1判断组织架构维护状态 - judgeOrgMaintenanceStatus
        JudgeOrgMaintenanceStatusRespDto judgeOrgMaintenanceStatusRespDto = null;
        JudgeOrgMaintenanceStatusReqDto judgeOrgMaintenanceStatusReqDto = new JudgeOrgMaintenanceStatusReqDto();
        if (reqDto != null) {
            judgeOrgMaintenanceStatusReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:381181_1
        }

        /*D1判断组织架构维护状态[4925]   */

        judgeOrgMaintenanceStatusRespDto = fwBaseOrgClient.judgeOrgMaintenanceStatus(judgeOrgMaintenanceStatusReqDto).getData();


        judgeOrgMaintenanceStatusRespDto_1 = judgeOrgMaintenanceStatusRespDto;

        BffJudgeOrgMaintenanceStatusComRespDto retData = new BffJudgeOrgMaintenanceStatusComRespDto();
        if (judgeOrgMaintenanceStatusRespDto_1 != null) {
            retData.setUsingLockStatus(judgeOrgMaintenanceStatusRespDto_1.getUsingLockStatus());//SimpleFieldAssign//sourceId:381185_1
            retData.setReasonOfUsingLock(judgeOrgMaintenanceStatusRespDto_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:381186_1
        }


        return retData;
    }

    /**
     * B1-执行API对接员工信息(管理)[7415]
     * gen by moon at 9/16/2023, 2:59:47 PM
     */
    @Trace(operationName = "B1-执行API对接员工信息(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementApiDockingPersonInfoRespDto implementApiDockingPersonInfo(BffImplementApiDockingPersonInfoReqDto reqDto) {


        //步骤0: D1-执行组织架构API对接员工信息 - implementApiDockingPersonInfo
        ImplementApiDockingPersonInfoRespDto implementApiDockingPersonInfoRespDto = null;
        ImplementApiDockingPersonInfoReqDto implementApiDockingPersonInfoReqDto = new ImplementApiDockingPersonInfoReqDto();
        if (reqDto != null) {
            implementApiDockingPersonInfoReqDto.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1123067_1
        }

        /*D1-执行组织架构API对接员工信息[7414]   */
        Assert.isNull(implementApiDockingPersonInfoReqDto.getProjectId(), "B1-执行API对接员工信息(管理)-D1-执行组织架构API对接员工信息-关联项目ID不能为空", false);
        implementApiDockingPersonInfoRespDto = fwBaseOrgClient.implementApiDockingPersonInfo(implementApiDockingPersonInfoReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementApiDockingPersonInfoRespDto retData = new BffImplementApiDockingPersonInfoRespDto();


        return retData;
    }

    /**
     * B1-执行API对接部门信息(管理)[7416]
     * gen by moon at 9/16/2023, 2:59:55 PM
     */
    @Trace(operationName = "B1-执行API对接部门信息(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementOrgImportDeptDataByApiRespDto implementOrgImportDeptDataByApi(BffImplementOrgImportDeptDataByApiReqDto reqDto) {


        //步骤0: D1-执行组织架构API对接部门信息 - implementOrgImportDeptDataByApi
        ImplementOrgImportDeptDataByApiRespDto implementOrgImportDeptDataByApiRespDto = null;
        ImplementOrgImportDeptDataByApiReqDto implementOrgImportDeptDataByApiReqDto = new ImplementOrgImportDeptDataByApiReqDto();
        if (reqDto != null) {
            implementOrgImportDeptDataByApiReqDto.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1123188_1
        }

        /*D1-执行组织架构API对接部门信息[7412]   */
        Assert.isNull(implementOrgImportDeptDataByApiReqDto.getProjectId(), "B1-执行API对接部门信息(管理)-D1-执行组织架构API对接部门信息-关联项目ID不能为空", false);
        implementOrgImportDeptDataByApiRespDto = fwBaseOrgClient.implementOrgImportDeptDataByApi(implementOrgImportDeptDataByApiReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementOrgImportDeptDataByApiRespDto retData = new BffImplementOrgImportDeptDataByApiRespDto();


        return retData;
    }
    //
}
